import request from '@/utils/request'

const api = {
    creates: '/v1/auth/user',
    deletes: '/v1/auth/user',
    updates: '/v1/auth/user',
    query: '/v1/auth/user',
  getUserByDeptId: '/v1/auth/user/getUserByDeptId',
}


export const getList = e => {
    return request({
        url: api.query,
        method: 'get',
        params: e
    })
}

export const getUserByDeptId = e => {
    return request({
        url: api.getUserByDeptId,
        method: 'get',
        params: e
    })
}

export const add = e => {
    return request({
        url: api.creates,
        method: 'post',
        data: e
    })
}

export const edit = (e, id) => {
    return request({
        url: api.updates + '/' + id,
        method: 'put',
        data: e
    })
}

export const deletes = id => {
    return request({
        url: api.creates + '/' + id,
        method: 'delete',
    })
}